package pojo;

import java.util.Objects;

public class Phone {

    private String phone;

    @Override
    public String toString() {
        return "Phone{" +
                "phone='" + phone + '\'' +
                '}';
    }

    public Phone(String phone) {
        this.phone = phone;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Phone(){}

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof Phone) {
            Phone obj1 = (Phone) obj;
            return this.phone.equals(obj1.phone);
        }
        return false;
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(phone);
    }
}
